/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.mc.sdk.filecenter.dto;

import cn.hallele.mc.sdk.filecenter.common.enums.FileTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serial;
import java.io.Serializable;

/**
 * hallele_mc_sdk
 *
 * @author anle5
 * @since 2024/9/16 16:58
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "文件传输类")
public class FileDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -3879959096484376553L;

    /**
     * 文件id
     */
    @Schema(description = "文件唯一标识")
    private Long id;

    /**
     * 文件地址
     */
    @Schema(description = "文件地址")
    private String url;

    /**
     * 文件名
     */
    @Schema(description = "文件传输类")
    private String filename;

    /**
     * 文件路径
     */
    @Schema(description = "文件路径")
    private String filepath;

    /**
     * 业务类型,用于做存储路劲映射
     */
    @Schema(description = "业务类型")
    private String action;

    /**
     * 文件类型
     */
    @Schema(description = "文件类型")
    private FileTypeEnum filetype;

    /**
     * MD5值
     */
    @Schema(description = "MD5值")
    private String md5;

    /**
     * 文件大小
     */
    @Schema(description = "文件大小")
    private Long fileSize;

    /**
     * 过期时间,单位 s
     */
    @Schema(description = "文件传输类")
    private Integer expires;

    /**
     * 文件流
     */
    @Schema(description = "文件传输类")
    private MultipartFile multipartFile;
}
